//
//  AViewController.m
//  delegate
//
//  Created by gavin on 14-2-14.
//  Copyright (c) 2014年 gavin. All rights reserved.
//

#import "AViewController.h"

@interface AViewController ()

@end

@implementation AViewController

- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
    self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
    if (self) {
    }
    return self;
}

- (void)viewDidLoad
{
    [super viewDidLoad];
}

- (IBAction)aBut:(id)sender {
    BViewController *bView = [[BViewController alloc] initWithNibName:@"BViewController" bundle:nil];
    bView.dalegate = self;
    [self presentViewController:bView animated:YES completion:^{
        
    }];
}

// delegate
- (void) changeValue:(NSString *)value{
    self.aLable.text = value;
}

@end
